home *** CD-ROM | disk | FTP | other *** search
- Compare(V37) Compare(V37)
-
-
- FORMAT
- COMPARE [[FILE1] file] [[FILE2] file] [[SKIP1] n] [[SKIP2]
- n] [QUIET]
-
- TEMPLATE
- FILE1,FILE2,SKIP1/N,SKIP2/N,QUIET/S
-
- PURPOSE
- To perform a byte-by-byte comparison of two files.
-
- SPECIFICATION
- COMPARE compares the two files given by FILE1 and file2.
- If only one file is given, the default input is used for
- the other. It is an error if both FILE1 and FILE2 2 are
- omitted. COMPARE makes no comment if the files are the
- same; if they differ, it reports the byte (in both decimal
- and hex) and line number at which the difference occured,
- or, that one file is an initial subsequence of the other.
- SKIP1 and SKIP2 are initial decimal byte offsets into
- FILE1 and FILE2 respectively. If the QUIET switch is used,
- COMPARE will print nothing for differing files; it will
- set the condition flag only. QUIET does not suppress the
- printing of error messages.
-
- The condition flag, RC, is set to 0 for identical files, 5
- (WARN) for different files, and 10 (ERROR) for bogus argu-
- ments like inaccessible files.
-
- EXAMPLE
- If you want to express an offset in octal or hexadecimal,
- you can use EVAL (see EVAL(AmigaDOS)):
-
- 1> COMPARE Foo Bar `EVAL 0x1FE`
-
- SEE ALSO
- COMMON(V37)
-
- UNIX EQUIVALENT
- cmp(1)
-
- AUTHOR
- Torsten Poulin (torsten@diku.dk)
-
- UNRESTRICTIONS
- COMPARE is free; anyone may redistribute copies of COMMPARE
- to anyone under the terms stated in the GNU General Public
- Licence, a copy of which accompanies each copy of COMPARE.
-
- Torsten Poulin encourages you to improve and extend COM-
- PARE, and urges that you contribute your extensions to the
- world.
-
- Compare version 37.5 21 June 1993
-